package cn.ydt.ydt.pojo.user.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import static cn.ydt.ydt.common.utils.RegExpressions.USER_LOGIN_PHONE;
import static cn.ydt.ydt.common.utils.RegExpressions.USER_LOGIN_PHONE_MESSAGE;

@ApiModel(value = "用户登录dto")
@Data
public class UserLoginDTO {
    @ApiModelProperty(value = "登录手机号", name = "userPhone", example = "182123456", required = true)
    @NotNull(message ="手机号不允许为空！")
    @Pattern(regexp =USER_LOGIN_PHONE , message = USER_LOGIN_PHONE_MESSAGE)
    private String userPhone;

    @ApiModelProperty(value = "登录密码", name = "userPassword", example = "123456", required = true)
    @NotNull(message ="密码不允许为空！")
    private String userPassword;
}
